home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cchh01.arc
/
TAPE.H
< prev
next >
Wrap
Text File
|
1986-03-14
|
2KB
|
76 lines
#ifndef FALSE
#define FALSE 0x00
#define TRUE !(FALSE)
#endif
#define DEFREC 0x2010 /* default record length = 8208 */
#define NBLK 0x60 /* default mode argument */
/* port definitions */
#define INSTAT 0x301
#define INDATA 0x302
#define OUTMA 0x300
#define OUTPA 0x301
#define OUTCA 0x302
#define OUTDATA 0x303
/* INSTAT bit map */
#define OUT 0x01
#define IN 0x02
/* command arguments */
#define READ 0x01
#define WRITE 0x02
#define MARK 0x03
#define SEARCH 0x0B
#define SKIPREC 0x0C
#define SKIPMRK 0x0D
#define BACKREC 0x0E
#define BACKMRK 0x0F
#define RESET 0x10
#define REWIND 0x40
#define GETSTAT 0xFF
/* INTERNAL command arguments */
#define SETRECL 0x09
#define DETRECL 0x15
/* interface status bit map */
#define DTFOUND 0x40
#define COMSTAT 0x30
#define ERRCODE 0x0F
/* COMSTAT bit map */
#define OK 0x00
#define ABORTWO 0x10
#define ABORTW 0x20
#define SYNTAX 0x30
/* ERRCODE bit map */
#define FLAGC 0x00 /* flag condition exists..caused by power loss, manual
rewind, or new tape inserted..correct by issuing
rewind command */
#define WRTPROT 0x01 /* write request to write protected tape */
#define INVDRV 0x02 /* write req to invalid drive or empty drive */
#define DRVFAIL 0x03 /* drive failed to respond to command */
#define VERFM 0x06 /* file mark verification error after writing it */
#define TRABORT 0x07 /* transport abort prior to command completion */
/* following are hardware reported errors */
#define RDFAIL8 0x08 /* read failure */
#define RDFAIL9 0x09 /* CRC record error */
#define RDFAILA 0x0A /* short record error */
#define RDFAILB 0x0B /* bad vertical parity */
#define WTFAILC 0x0C /* read after write verify error */
#define WTFAILD 0x0D /* makes no sense to me */
#define RDFAILE 0x0E /* file mark detected */
/* drive status bit map */
#define FMFOUND 0x40
#define DRVREW 0x20
#define ONLINE 0x10
#define BOTP 0x08
#define EOTP 0x04
#define WRTENABL 0x01